package com.Apo1o.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: Apo1o.
 * @Date: 2023/11/14-11-14-15:10
 * @Description： com.Apo1o.config
 */
@Configuration
public class MybatisPlusConfig {

@Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
    //1.创建MybatisPlusInterceptor拦截器对象
    MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
    //2.添加分页拦截器
    mybatisPlusInterceptor.addInnerInterceptor(new
            PaginationInnerInterceptor());
    return mybatisPlusInterceptor;
}



}
